package acwing._2LanQiao._11No11;
/**
 * @Project : AlgorithmLearning
 * @Package : ACWing._2LanQiao._11No11
 * @File : Q2066.java
 * @Author : WangRuoyu
 * @Date : 2023/3/27 17:07
 */

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Q2066 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();
        StringBuilder sb = new StringBuilder();

        int x = 0;
        while (x < line.length()) {
            char a = line.charAt(x);
            if (x == line.length() - 1) {
                sb.append(a);
                break;
            } else {
                char b = line.charAt(x + 1);
                if (b > '0' && b <= '9') {
                    for (int i = 0; i < b - '0'; ++i) {
                        sb.append(a);
                    }
                    x += 2;
                } else {
                    sb.append(a);
                    x += 1;
                }
            }
        }
        System.out.println(sb);
    }
}
